--编写者：alt
--功能介绍：修复背包容器的显示bug
--使用方法：直接粘贴到模组环境 需要修改herta_necklace为对应的物品tag

--bug描述：重进游戏 身体栏的背包如果是默认关闭会有显示bug
--修改克雷的判断
--这里不修改的话会有背包容器的显示bug
local Inventory_replica = require "components/inventory_replica"
local oldreplicaGetOverflowContainer = Inventory_replica.GetOverflowContainer
function Inventory_replica:GetOverflowContainer(...)
    local result = oldreplicaGetOverflowContainer(self, ...)
    if result and result.inst and result.inst:HasTag("herta_necklace") then
        return nil
    end
    return result
end

local Inventory = require "components/inventory"
local oldGetOverflowContainer = Inventory.GetOverflowContainer
function Inventory:GetOverflowContainer(...)
    local result = oldGetOverflowContainer(self, ...)
    if result and result.inst and result.inst:HasTag("herta_necklace") then
        return nil
    end
    return result
end